<!--# layout("/common/layout.html",{"jsBase":"/js/meet/meetRecord/"}){ -->

<form class="layui-form layui-form-pane" id="addForm"  lay-filter="editform">
    <input type="hidden" name="meetId" id="meetId">

    <br>
    <div class="layui-row">
        <div class="layui-form-item">
          <div class="layui-inline">
          <label class="layui-form-label">预约编号</label>
              <div class="layui-input-inline">
                  <input type="text" name="meetNo" id="meetNo" autocomplete="off" maxlength="50" class="layui-input" >
              </div>
          </div>
          <div class="layui-inline">
          <label class="layui-form-label">约见主题</label>
              <div class="layui-input-inline">
                  <input type="text" name="meetTitle" id="meetTitle" autocomplete="off" maxlength="50" class="layui-input" >
              </div>
          </div>
          <!--
          <div class="layui-inline">
          <label class="layui-form-label">约见附件</label>
              <div class="layui-input-inline">
                  <input type="text" name="meetFile" id="meetFile" autocomplete="off" maxlength="50" class="layui-input" >
              </div>
          </div>-->
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">预约类型</label>
				<div class="layui-input-inline">
                    <layui:simpleDataSelect name="meetType" value="${has(meetRecord)?meetRecord.meetType:''}" data="${serviceTypeList}"
                                attrId="value" attrName="name" laySearch="true" />
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">预约状态</label>
				<div class="layui-input-inline">
                    <select name="meetStatus" lay-verify="">
                        <option value="">不限制</option>
                        <option value="0">待预约</option>
                        <option value="1">已预约</option>
                        <option value="2">已服务</option>
                        <option value="3">已取消</option>
                    </select>
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">约见地址</label>
                <div class="layui-input-inline">
                    <input type="text" name="meetAddr" id="meetAddr" autocomplete="off" maxlength="50" class="layui-input" lay-verify="required">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">约见时间</label>
                <div class="layui-input-inline">
                    <input type="text" name="meetTime"  id="meetTime" autocomplete="off" class="layui-input input-date" >
                </div>
            </div>
        </div>
    </div>

<div class="layui-row">

    <div class="layui-row">
        <div class="layui-form-item">

            <div class="layui-inline">
                <label class="layui-form-label">服务价格(元)</label>
                <div class="layui-input-inline">
                    <input type="text" name="meetPrice" id="meetPrice" autocomplete="off" maxlength="50" class="layui-input" lay-verify="required">
                </div>
            </div>

            <div class="layui-inline">
            <label class="layui-form-label">支付状态</label>
				<div class="layui-input-inline">
                    <select name="payStatus" lay-verify="">
                        <option value="">不限制</option>
                        <option value="0">待支付</option>
                        <option value="1">已支付</option>
                    </select>
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">

            <div class="layui-inline">
                <label class="layui-form-label">服务态度</label>
                <div class="layui-input-inline">
                    <select name="attitude" lay-verify="">
                        <option value="">不限制</option>
                        <option value="0">很差</option>
                        <option value="1">一般</option>
                        <option value="2">良好</option>
                        <option value="3">优秀</option>
                    </select>
                </div>
            </div>

            <div class="layui-inline">
            <label class="layui-form-label">服务能力</label>
				<div class="layui-input-inline">
                    <select name="fwscore" lay-verify="">
                        <option value="">不限制</option>
                        <option value="1">一星</option>
                        <option value="2">二星</option>
                        <option value="3">三星</option>
                        <option value="4">四星</option>
                        <option value="5">五星</option>
                    </select>
				</div>
            </div>
        </div>
    </div>

    <!--
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">家长ID</label>
				<div class="layui-input-inline">
                    <input type="text" name="fromCustomerid" id="fromCustomerid" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">服务老师</label>
				<div class="layui-input-inline">
                    <input type="text" name="toCustomerid" id="toCustomerid" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>-->

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">学生疑问</label>
                <div class="layui-input-block" style="width:512px">
                    <textarea name="studentQuestion"  id="studentQuestion" placeholder="请输入" class="layui-textarea" ></textarea>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">学生情况</label>
                <div class="layui-input-block" style="width:512px">
                    <textarea name="studentBrief"  id="studentBrief" placeholder="请输入" class="layui-textarea" ></textarea>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">服务备注</label>
                <div class="layui-input-block" style="width:512px">
                    <textarea name="meetMemo"  id="meetMemo" placeholder="请输入" class="layui-textarea" ></textarea>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">服务评语</label>
                <div class="layui-input-block" style="width:512px">
                    <textarea name="comment"  id="comment" placeholder="请输入" class="layui-textarea" ></textarea>
                </div>
            </div>
        </div>
    </div>
    <layui:submitButtons id="addButton" />
</form>

<!--#} -->
<script>
layui.extend({
    loading: '../../../plugins/layui_extends/loading/loading',
}).define([ 'form', 'laydate', 'table','loading','meetRecordApi'], function(exports) {
    var form = layui.form;
    var meetRecordApi = layui.meetRecordApi;
    var index = layui.index;
    var isNew = true;
    <!--# if(!(isEmpty(meetRecordJson))){  -->
    isNew = false;
    <!--# } -->
    var view = {
        init:function(){
            Lib.initGenrealForm($("#addForm"),form);
            this.initSubmit();
        },
        initSubmit:function(){
            $("#addButton").click(function(){
                // $("#addButton").hide();
                // $("#addButton-loading").show();
                // $("#addButton-loading").loading();
                form.on('submit(form)', function(){
                    meetRecordApi.saveForm(isNew,$('#addForm'),function(){
                        parent.window.dataReload();
                        Common.info("保存成功");
                        Lib.closeFrame();
                    });
                });
            });

            $("#addButton-cancel").click(function(){
                Lib.closeFrame();
            });
        }

    }
    view.init();
    <!--# if(!(isEmpty(meetRecordJson))){  -->
    var formJson = ${meetRecordJson};
    form.val("editform",formJson);
    <!--# } -->
});
</script>
